package priv.mill.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import priv.mill.mapper.NewBooksMapper;
import priv.mill.model.Books;

import priv.mill.service.NewBooksService;

@Controller
@RequestMapping("book")
public class NewBooksController {
	@Resource
	private NewBooksService newbooksService;
//	@Resource
//	private NewBooksMapper newbooksMapper;
	
	@GetMapping("all")
	@ResponseBody
	public Books findAll() {
		
		return newbooksService.findAll();
		
	}
//	@GetMapping("insert")
//	@ResponseBody
//	public Books findInsert() {
//		return newbooksService.findInsert();
//	}
}
